global activeSprite, snap1, snap2, stickh1, stickh2, stickv1, stickv2
if not snap1 and not snap2 then
if (the locH of sprite activeSprite > (stickh1 - 70)) and (the locH of sprite activeSprite < (stickh1 + 70)) and (the locV of sprite activeSprite > (stickv1 - 40)) and (the locV of sprite activeSprite < (stickv1 + 40)) then
set the locH of sprite activeSprite to stickh1
set the locV of sprite activeSprite to stickv1
set snap1 to 1
puppetSound(0)
puppetSound("Floop.S")
updateStage()
wait(20)
puppetSound(0)
else
if (the locH of sprite activeSprite > (stickh2 - 70)) and (the locH of sprite activeSprite < (stickh2 + 70)) and (the locV of sprite activeSprite > (stickv2 - 40)) and (the locV of sprite activeSprite < (stickv2 + 40)) then
set the locH of sprite activeSprite to stickh2
set the locV of sprite activeSprite to stickv2
set snap2 to 1
puppetSound(0)
puppetSound("Floop.S")
updateStage()
wait(20)
puppetSound(0)
else
set the locH of sprite activeSprite to the mouseH
set the locV of sprite activeSprite to the mouseV
end if
end if
else
if snap1 and ((the mouseH < (stickh1 - 70)) or (the mouseH > (stickh1 + 70)) or (the mouseV < (stickv1 - 40)) or (the mouseV > (stickv1 + 40))) then
set the locH of sprite activeSprite to the mouseH
set the locV of sprite activeSprite to the mouseV
set snap1 to 0
end if
if snap2 and ((the mouseH < (stickh2 - 70)) or (the mouseH > (stickh2 + 70)) or (the mouseV < (stickv2 - 40)) or (the mouseV > (stickv2 + 40))) then
if ((the locH of sprite activeSprite <> homeH) or (the locV of sprite activeSprite <> homeV)) and (the name of cast the castNum of sprite activeSprite = tempName) then
if not snap1 and not snap2 then
set the visible of sprite oldActive to 1
set the visible of sprite activeSprite to 0
set the locH of sprite activeSprite to homeH
set the locV of sprite activeSprite to homeV
puppetSound("slow Boing.s")
updateStage()
wait(30)
puppetSound(0)
go("Start")
else
puppetSound("Toots.s")
updateStage()
wait(20)
puppetSound(0)
if snap1 then
if the name of cast the castNum of sprite activeSprite = tempName then
set the castNum of sprite 6 to the castNum of sprite 6 - integer(tempName)
set the castNum of sprite 11 to the castNum of sprite 11 + integer(tempName)
set tempNo to 5 - integer(tempName)
set the locH of sprite 11 to getAt(LbalanceHList, tempNo)
set the locV of sprite 11 to getAt(LbalanceVList, tempNo)
set the locH of sprite 12 to getAt(RbalanceHList, tempNo)
set the locV of sprite 12 to getAt(RbalanceVList, tempNo)
set LcurrentWeight to integer(tempName)
set tempNo to 6 * integer(tempName)
set the locV of sprite activeSprite to the locV of sprite activeSprite + tempNo
set side to "Left"
go("begin")
moveMiddle()
end if
end if
end if
if snap2 then
if the name of cast the castNum of sprite activeSprite = tempName then
set the castNum of sprite 6 to the castNum of sprite 6 + integer(tempName)
set the castNum of sprite 12 to the castNum of sprite 12 + integer(tempName)
set tempNo to 5 + integer(tempName)
set the locH of sprite 12 to getAt(RbalanceHList, tempNo)
set the locV of sprite 12 to getAt(RbalanceVList, tempNo)
set the locH of sprite 11 to getAt(LbalanceHList, tempNo)
set the locV of sprite 11 to getAt(LbalanceVList, tempNo)
set RcurrentWeight to integer(tempName)
set tempNo to 6 * integer(tempName)
set the locV of sprite activeSprite to the locV of sprite activeSprite + tempNo